/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class DoorAndWindowSensor {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010020029';
    }

    get categoryName() {
        return '\u95e8\u7a97\u4f20\u611f\u5668';
    }

    getPreventRemoveAlarm(params) {
        return command({
            method: 'getPreventRemoveAlarm',
            methodId: 'ptRSbsUK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSensitivity(params) {
        return command({
            method: 'getSensitivity',
            methodId: 'p1vFBbBE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getStatus(params) {
        return command({
            method: 'getStatus',
            methodId: 'pGox7xtI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTimeoutAlarmStatus(params) {
        return command({
            method: 'getTimeoutAlarmStatus',
            methodId: 'phEq1DLM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTimeoutAlarmSwitch(params) {
        return command({
            method: 'getTimeoutAlarmSwitch',
            methodId: 'pDrhEc49',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTimeoutTime(params) {
        return command({
            method: 'getTimeoutTime',
            methodId: 'pghzWY8n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setPreventRemoveAlarm(params) {
        return command({
            method: 'setPreventRemoveAlarm',
            methodId: 'pZgRtGiz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSensitivity(params) {
        return command({
            method: 'setSensitivity',
            methodId: 'peHyqSmo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTimeoutAlarmSwitch(params) {
        return command({
            method: 'setTimeoutAlarmSwitch',
            methodId: 'ppAXiV9R',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTimeoutTime(params) {
        return command({
            method: 'setTimeoutTime',
            methodId: 'pUPQO32W',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default DoorAndWindowSensor;
